@import "definitions.scss";

* {
  font-family: inherit;
  border: none;
  font-size: 100%;
  font-style: inherit;
  margin: 0;
  padding: 0; }

html {
  background: #fff; }

ol, ul {
  margin: 0.3em 0; }

table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: auto;
  margin-top: 1em; }

body {
  line-height: 1.2em;
  margin: 0;
  padding: 0;
  padding: 0 1em;
  text-align: justify; }

/* Structure */

.halftitlepage {
  margin: auto;
  text-align: center; }

.titlepage {
  margin: auto;
  text-align: center;
  h1 {
    padding-top: 0;
    line-height: 1.3em;
    font-size: 3em;
    font-style: italic;
    font-weight: normal;
  } 
  
  h2 {
    padding-top: 0;
    line-height: 1.3em;
    font-size: 1.5em;
    font-weight: normal;
    margin-bottom: 0.5em;
    prince-bookmark-level: none; 
  }
}

.halftitlepage {
  h1 {
    padding-top: 0;
    font-size: 3em;
    font-weight: normal;
    line-height: 1.3em;
    font-style: italic;
    margin-bottom: 0.2em; }
  h2 {
    padding-top: 0;
    font-size: 1.5em;
    font-weight: normal;
    line-height: 1.3em;
    prince-bookmark-level: none; } }

.author {
  font-size: 1em; }

.pubdate {
  font-size: 0.8em; }

li {
  margin: 0;
  margin-left: 1.3em; }

ul { 
  li {
    list-style-type: disc;
    li {
      list-style-type: circle;
      li {
        list-style-type: square;
      }
    }
  }
}

ol li {
  list-style-type: decimal; }

.contents li {
  list-style-type: none; }

img {
  margin: 0 5px;
  padding: 2px; 
  max-width: 675px;
}

dt {
  font-weight: bold;
  margin-top: 1em; }

dd {
  font-style: italic; }

blockquote {
  margin: 1em 1em;
  font-style: italic;
  color: #121212; }

table {
  @include standard-border; }

th {
  background: #EEE; }

tr, td, th {
  padding: 5px; }

td, tr, th {
  @include standard-border; }

sup {
  font-size: 0.7em;
  font-weight: bold;
  margin-left: -0.4em; }

/* BLOCKS */

.center {
  margin: auto;
  text-align: center; }

.left {
  margin: auto;
  text-align: left; }

.right {
  margin: auto;
  text-align: center; }

.note, .important, .tip, .caution, .box {
  border-top: 1px solid $border-color;
  border-bottom: 1px solid $border-color;
  display: block;
  min-height: 50px;
  margin: 1em auto;
  padding: 0.5em 0.5em;
  width: 600px;
  color: #000; }

.note>p, .important>p, .tip>p, .caution>p {
  display: block;
  margin: 0;
  padding: 0; }

.note-title {
  display: block;
  vertical-align: middle;
  font-weight: bold;
  font-variant: small-caps;
  margin-right: 1em; }

.box-title {
  display: block;
  text-align: center;
  font-variant: small-caps;
  font-weight: bold; }

.comment {
  display: block;
  border: 1px solid #004D00;
  background: #7AFF7A;
  padding: 3px;
  margin: 1px;
  .comment-pre {
    color: #004D00; } }

.todo {
  display: block;
  border: 1px solid #990000;
  background: #FF9999;
  padding: 3px;
  margin: 1px;
  .todo-pre {
    color: #990000; } }

/* TEXT */

body {
  color: #000;
  font-size: 1em; }

h2, section section section h1, h1.toc-header {
  display: block;
  font-size: 2em;
  font-weight: bold;
  margin: 1em 0; }

h3, section section section section h1 {
  font-size: 1.6em;
  font-weight: bold;
  margin: 3em 0 1em 0; }

h4, section section section section section h1 {
  font-size: 1.3em;
  font-weight: bold;
  margin: 3em 0 1em 0; }

h5, section section section section section section h1 {
  font-size: 1.2em;
  font-weight: bold;
  margin: 3em 0 1em 0; }

h6, section section section section section section section h1 {
  font-size: 1.1em;
  font-weight: bold;
  margin: 3em 0 1em 0; }

em {
  font-style: italic; }

a {
  color: $link-color;
  text-decoration: none;
  &:hover {
    color: $link-hover-color; } }

.code > pre {
  @include codeblock; }

code, .CodeRay { 
  font-size: 0.8em; }

span.line-numbers {
  margin: 0;
  padding: 3px; }

nav, .navigation {
  display: block;
  margin: 1em auto;
  text-align: center;
  @include standard-border; }

nav {
  &.contents {
    margin: auto;
    text-align: left;
    border: none; }
  a {
    margin: 1em; } }

.navigation a {
  margin: 1em; }

nav.contents a {
  margin: 0; }

mark {
  font-weight: bolder;
  font-style: italic;
  background: none; }

td {
  p, ul, ol {
    margin: 0; } }

.topic {
  margin: 2em auto; }

/* FONTS */

@import url(http://fonts.googleapis.com/css?family=Crimson+Text:400,700,400italic,700italic|Inconsolata);

body {
  font-family: "Crimson Text", Serif; }

code, pre {
  font-family: "Inconsolata", Monospace; }
